var container = document.getElementById("gpViewCount"); if(container){ container.innerHTML = "524242"; }else{ document.write("524242"); }